home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / mac / mac535.hqx / Mac 535 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1993-03-30  |  16KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>225</cardCount>
  7.     <cardID>5883</cardID>
  8.     <listID>65961</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on openStackglobal Manual, TheDays, Talk, byChannel, SPortGlobals, tempsecsglobal onLine, fromRcvr,commanding,instantChannel,flashing, stationList,countryListglobal BWCWidth, PBShiftif the version < 2.0 thenanswer "This utility requires HyperCard 2.0 or later."go homeend ifset the userLevel to 5set lockScreen to truehide msgput "-" after menu "File"put "Quit Mac535" after menu "File" with menuMsgs "doLeave"create menu "Utils"put "Write file...,Read file...,Print report..." into menu "Utils"┬¼with menuMsgs "doWriteFile,doReadFile,doChannelReport"create menu "Scan"put "by Frequency...,by Channels...,by Band..." into menu "Scan"┬¼with menuMsgs "doFreqScan,doChannelScan,doBandScan"set icon of bg button id 40 to "receiverControl OFF"set the name of bg button id 40 to "Control OFF"put true into Manualput false into commandingset the name of bg button id 52 to "Following 535"hide bg button id 52put false into Talkput empty into fromRcvrput false into onLineput "Sun,Mon,Tue,Wed,Thu,Fri,Sat" into TheDaysconfigureSPort modemPort,baud4800,data8,stop10,parityOff,stripOn,stripControlsOn,lineFeedsOffsetSPortBufferSize 10240 -- use default bufferset the highlite of bg btn id 39 to trueset the highlite of bg btn id 55 to trueset the highlite of bg btn id 56 to true-- load station & countries listsput empty into stationListput empty into countryListrepeat with x = 1 to the number of lines of cd field "Station List" of cd "Station Entry"put item 1 of line x of (cd field "Station List" of cd "Station Entry") & "," after stationListput item 2 of line x of (cd field "Station List" of cd "Station Entry") & "," after countryListend repeatdelete the last char of stationListdelete the last char of countryListend openStackon closeStackif name of bg btn id 40 is "Control ON" thenclick at the loc of bg button id 40end ifreset menuBarcloseSPortend closeStackon doLeavesendSPort "H0" & returnreset menuBargo homeend doLeave-- on myEscape-- reset menubar-- end myEscapeon doWriteFileask file "Enter name for report file" with "Mac535 Channel List"if It is empty thengo to card "Main Control Panel"exit doWriteFileend ifput It into fileNameopen file fileNamevisual effect dissolve fastgo to card "Channel000"repeat with Num = 0 to 199set cursor to busyput empty into outRecput bg fld "channel #" & tab after outRecput bg fld "Station" & tab after outRecset cursor to busyput bg fld "Country" & tab after outRecput bg fld "kHz" & tab after outRecput bg fld "Mode" & tab after outRecset cursor to busyput bg fld "Bandwidth" & tab after outRecput bg fld "AGC" & tab after outRecput bg fld "Attenuator" & tab after outRecset cursor to busyput bg fld "Remarks" after outRecput return after outRecwrite outRec to file fileNameset cursor to busyif Num < 199 then go to next cardadd 1 to Numend repeatclose file fileNameanswer "Report completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"end doWriteFileon doReadFileglobal inChannelReadanswer "This will overwrite the channels currently stored in the stack!  Do you want to do this?" with "Go Ahead" or "Cancel"if it is "Cancel" thenexit doReadFileend ifanswer file "Enter name of file containing channel data" of type "TEXT"if the result is not empty thenexit doReadFileend ifput It into fileNameopen file fileName-- execute this loop until EOFput True into inChannelReadgo to card "Channel000"repeat with Num = 0 to 199read from file fileName until returnif it is empty thenclose file fileNameput false into inChannelReadanswer "File read completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"exit doReadFileend ifput it into msg-- wait until the mouseClickput char 1 to offset (tab,it) - 1 of it into bg fld "channel #"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Station"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Country"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "kHz"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Mode"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Bandwidth"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "AGC"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Attenuator"delete char 1 to offset (tab,it) of itput char 1 to offset (tab,it) - 1 of it into bg fld "Remarks"if Num < 199 then go to next card of bg "Channel Data"-- add 1 to Numend repeatclose file fileNameput false into inChannelReadanswer "File read completed!" with "Ok"visual effect dissolve fastgo to card "Main Control Panel"exit doReadFileend doReadFileon doChannelReportend doChannelReport-- on do9In-- set the loc of cd window to 70,70-- end do9In-- on do19In-- -- set the loc of cd window to 256,213-- end do19Inon doFreqScanglobal scanHi,scanLo,scanUpgo to card "Frequency Select"end doFreqScanon doChannelScanend doChannelScanon doBandScanglobal scanHi,scanLo,scanUpgo to card "Band Select"end doBandScanon sendFreqglobal commandingif not commanding thenbeepexit sendFreqend ifput bg fld "DIAL" of card 1 INTO dialTempmultiply dialTemp by 1000set numberFormat to "00000000.#"sendSPort "F" & dialTemp & returnend sendFreqon doModeglobal commandingif not commanding thenbeepexit doModeend ifif line 1 of BG FIELD "MODE" of card "Main Control Panel" = "RTTY" thensendSPort "D0" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "CW" thensendSPort "D1" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "USB" thensendSPort "D2" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "LSB" thensendSPort "D3" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "AM" thensendSPort "D4" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "FM" thensendSPort "D5" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "FAX" thensendSPort "D6"else if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "ECSS-USB" thensendSPort "D7" & returnelse if line 1 of BG FIELD "MODE" of card "Main Control Panel" = "ECSS-LSB" thensendSPort "D8" & returnend ifend doModeon doBWglobal commandingif not commanding thenflash 2exit doBWend ifif line 1 of BG FIELD FILTER of card "Main Control Panel" = "WIDE" thensendSPort "B0" & returnelse if line 1 of BG FIELD FILTER of card "Main Control Panel" = "INTER" thensendSPort "B1" & returnelse if line 1 of BG FIELD FILTER of card "Main Control Panel" = "NARR" thensendSPort "B2" & returnelse   if line 1 of BG FIELD FILTER of card "Main Control Panel" = "AUX" thensendSPort "B3" & returnend ifend doBWon doATTglobal commandingif not commanding thenbeepexit doATTend ifif line 1 of bg field "ATT" of card "Main Control Panel" = "-0 dB" thensendSPort "A0" & returnelse if line 1 of bg field "ATT" of card "Main Control Panel" = "-20 dB" thensendSPort "A1" & returnend ifend doATTon doAGCglobal commandingif not commanding thenbeepexit doAGCend ifif line 1 of bg field "AGC" of card "Main Control Panel" = "SLOW" thensendSPort "G0" & returnelse if line 1 of bg field "AGC" of card "Main Control Panel" = "FAST" thensendSPort "G1" & returnelse if line 1 of bg field "AGC" of card "Main Control Panel" = "OFF" thensendSPort "G2" & returnend ifend doAGCon doBWCget the rect of bg btn id 70put item 3 of it - item 1 of it into BWCWidthset the numberformat to "0000"put  BWCWidth * 10 into BWCWidthsendSPort "W" & BWCWidth & returnput BWCWidth && "Hz" into bg field BWCResultend doBWCon doPBSglobal PBShiftset the numberformat to "0000"put (PBShift * 100) into PBShiftif PBShift >= 0 thenput "+" & PBShift into PBShiftend ifset the name of bg btn id 70 to pbshiftsendSPort "P" & PBShift & returnend doPBSon enterKeysend mouseUp to bg button "ENTER"end enterKey-- -- -- on Idle-- -- -- global Manual, TheDays, onLIne, fromRcvr-- -- -- -- Manual says we've made a change to parameters previously set by-- -- -- -- a memory channel recall (this makes the "MR" indicator mimic the-- -- -- -- real one on the 525.-- -- -- if Manual is true then-- -- -- put empty into bg field "Mem Recall" of card "Main Control Panel"-- -- -- else-- -- -- put "MR" into bg field "Mem Recall" of card "Main Control Panel"-- -- -- end if-- -- -- -- update the UTC clock and calendar every 15 seconds-- -- -- put the seconds into Temp-- -- -- if Temp mod 15 = 0 then-- -- -- put Temp + (5*60*60) into TempSecs-- -- -- set numberFormat to "00"-- -- -- convert TempSecs to dateItems-- -- -- put (item 4 of TempSecs *1) & ":" & (item 5 of TempSecs *1) && "UTC" into bg field "UTC Time" of card "Main Control Panel"-- -- -- put item 7 of TempSecs into Temp-- -- -- put item Temp of TheDays & " " & item 2 of TempSecs & "/" & item 3 of TempSecs into bg field "UTC Date" of card "Main Control Panel"-- -- -- end if-- -- -- -- if any parameters sent from receiver, get then and update display-- -- -- if onLine then-- -- -- put recvUpTo(return,0,fromRcvr) into fromRcvr    -- get chars up to a return; don't wait-- -- -- if fromRcvr is not empty then                    -- there are chars; parse them-- -- -- if (the last char of fromRcvr) is return then  -- got a complete command-- -- -- delete the last char of fromRcvr             -- strip the return-- -- -- put the first char of fromRcvr into theCmd   -- extract the command identifier-- -- -- put fromRcvr into theParam                   -- put the remainder into parameter-- -- -- delete the first char of theParam            -- strip the command letter-- -- -- put empty into fromRcvr                      -- clear for next command-- -- -- -- determine which command was received & process it-- -- -- if theCmd is "A" then-- -- -- if theParam is "0" then-- -- -- put "-0 dB" into bg fld "Att" of card "Main Control Panel"-- -- -- else if theParam is "1" then-- -- -- put "-20 dB" into bg fld "Att" of card "Main Control Panel"-- -- -- end if-- -- -- else if theCmd is "B" then-- -- -- if theParam is "0" then-- -- -- put "WIDE" into bg fld "Filter" of card "Main Control Panel"-- -- -- else if theParam is "1" then-- -- -- put "INTER" into bg fld "Filter" of card "Main Control Panel"-- -- -- else if theParam is "2" then-- -- -- put "NARR" into bg fld "Filter" of card "Main Control Panel"-- -- -- else if theParam is "3" then-- -- -- put "AUX" into bg fld "Filter" of card "Main Control Panel"-- -- -- end if-- -- -- else if theCmd is "C" then-- -- -- set numberFormat to "000"-- -- -- put theParam + 0 into bg fld "Channel" of card "Main Control Panel"-- -- -- else if theCmd is "D" then-- -- -- if theParam is "0" then-- -- -- put "RTTY" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "1" then-- -- -- put "CW" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "2" then-- -- -- put "USB" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "3" then-- -- -- put "LSB" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "4" then-- -- -- put "AM" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "5" then-- -- -- put "FM" into bg fld "Mode" of card "Main Control Panel"-- -- -- else if theParam is "6" then-- -- -- put "FAX" into bg fld "Mode" of card "Main Control Panel"-- -- -- end if-- -- -- else if theCmd is "F" then-- -- -- set numberFormat to "####0.00"-- -- -- divide theParam by 100-- -- -- put theParam into bg fld "Dial" of card "Main Control Panel"-- -- -- else if theCmd is "G" then-- -- -- if theParam is "0" then-- -- -- put "SLOW" into bg fld "AGC" of card "Main Control Panel"-- -- -- else if theParam is "1" then-- -- -- put "FAST" into bg fld "AGC" of card "Main Control Panel"-- -- -- else if theParam is "2" then-- -- -- put "OFF" into bg fld "AGC" of card "Main Control Panel"-- -- -- end if-- -- -- else-- -- -- put "Unknown response: " & theCmd into msg-- -- -- end if-- -- -- else-- -- -- -- save for next idle invocation-- -- -- end if-- -- -- end if-- -- -- end if-- -- -- end idleon Idleglobal Manual, TheDays, onLIne, fromRcvr, commanding, tempSecs-- Manual says we've made a change to parameters previously set by-- a memory channel recall (this makes the "MR" indicator mimic the-- real one on the 525.if Manual is true thenput empty into bg field "Mem Recall" of card "Main Control Panel"elseput "MR" into bg field "Mem Recall" of card "Main Control Panel"end if-- update the UTC clock and calendar every 15 secondsput the seconds into Tempif Temp mod 15 = 0 thenput Temp + (4*60*60) into TempSecs ---------***************set numberFormat to "00"convert TempSecs to dateItemsput (item 4 of TempSecs *1) & ":" & (item 5 of TempSecs *1) into bg field "UTC Time" of card "Main Control Panel"put item 7 of TempSecs into Tempput item Temp of TheDays & " " & item 2 of TempSecs & "/" & item 3 of TempSecs into bg field "UTC Date" of card "Main Control Panel"end if-- if any parameters sent from receiver, get then and update display-- ################### "I1" ROUTINE ######################if onLine then-- following test checks for zillions of chars coming from rcvr in "following"-- mode.  If more than about one full param set's available, just kill-- them all and issue a new inquiry.  This keeps the display up-to-date-- at all times.if (not commanding) and (charsAvailable() > 30) thenkillSPort InsendSPort "I1" & returnend ifput recvUpTo(return,0,fromRcvr) into fromRcvr    -- get chars up to a return; don't waitif fromRcvr is not empty then                    -- there are chars; parse themif (the last char of fromRcvr) is return then  -- got a complete commanddelete the last char of fromRcvr             -- strip the returnput the first char of fromRcvr into theCmd   -- extract the command identifierput fromRcvr into theParam                   -- put the remainder into parameterdelete the first char of theParam            -- strip the command letterput empty into fromRcvr                      -- clear for next command-- NOTE: the following code is skipped if we're commanding to keep--       the receiver's echos from screwing up the displayif not commanding then-- determine which command was received & process itif theCmd is "F" then      -- put this first in list 'cause it's the most common-- put true into Manualset numberFormat to "####0.000"divide theParam by 1000put theParam into bg fld "Dial" of card "Main Control Panel"else if theCmd is "A" then-- put true into Manualif theParam is "0" thenput "-0 dB" into bg fld "Att" of card "Main Control Panel"else if theParam is "1" thenput "-20 dB" into bg fld "Att" of card "Main Control Panel"end ifelse if theCmd is "B" then-- put true into Manualif theParam is "0" thenput "WIDE" into bg fld "Filter" of card "Main Control Panel"else if theParam is "1" thenput "INTER" into bg fld "Filter" of card "Main Control Panel"else if theParam is "2" thenput "NARR" into bg fld "Filter" of card "Main Control Panel"else if theParam is "3" thenput "AUX" into bg fld "Filter" of card "Main Control Panel"end ifelse if theCmd is "C" then   -- ignore to keep from conflicting with OUR chanel-- put false into Manual-- set numberFormat to "000"-- put theParam + 0 into bg fld "Channel"